// pages/timecard/history/history.js
const AV = require('../../../utils/av-weapp-min');
const Check = require('../../../model/check')

var app = getApp()
Page({
  data:{
    checks: null,
    worklog:null,
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数  
    var that = this;
    //获取记录
    wx.request({
      url: app.globalData.serverPath + 'miniuser/work/getWorkLog' ,
      data:{
        openid:app.globalData.openid,
      },
      success:function(res){
        console.log("获取打卡记录");
        console.log(res);
        if(res.data.code=="00"){
          that.setData({
            worklog:res.data.data,
          })
        }
      }
    })
  
  },
  onShow:function(){
  }
})